home *** CD-ROM | disk | FTP | other *** search
/ Champak 138 / Volume 138 Aug 19 2011 - Damaged.iso / Games / snowball.swf / scripts / DefineSprite_219 / frame_1 / DoAction.as
Text File  |  2011-08-19  |  497b  |  30 lines

  1. this.onEnterFrame = function()
  2. {
  3.    if(_root.startmoving == 1)
  4.    {
  5.       this._y -= _root.snowball.yspeed / 4;
  6.       if(_Y < -140 - _height)
  7.       {
  8.          _Y = 500;
  9.          _X = random(600);
  10.          this.gotoAndStop(1);
  11.       }
  12.    }
  13.    else
  14.    {
  15.       _Y = _Y + 2;
  16.    }
  17.    if(this.hitTest(_root.snowball.detector))
  18.    {
  19.       if(_root.weight < 300)
  20.       {
  21.          _root.snowball.play();
  22.       }
  23.       else
  24.       {
  25.          this.play();
  26.       }
  27.    }
  28. };
  29. stop();
  30.